package GUI;

import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.LayoutManager;

import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class GUI_page05_Admin extends JPanel {

	JLabel titleLabel;
	JButton returnButton;
	JButton createTablesButton;
	JButton dropTablesButton;
	JButton populateTablesButton;
	JButton insertToTableButton;
	JButton deleteFromTableButton;
	JButton displayTableButton;
	
	public GUI_page05_Admin() {
		this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
		this.setBackground(Color.white);
		// title label
		titleLabel = new JLabel("AMS Admin Menu", JLabel.CENTER);
		titleLabel.setVerticalTextPosition(JLabel.CENTER);
		
		titleLabel.setHorizontalTextPosition(JLabel.CENTER);
		titleLabel.setAlignmentX(Component.LEFT_ALIGNMENT);
		titleLabel.setFont(new Font("Century Gothic", Font.BOLD, 20));
		titleLabel.setForeground(Color.gray);
        this.add(titleLabel);
        
        this.add(Box.createRigidArea(new Dimension(0,20)));

        // return button
        returnButton = GUI_AMSStoreMain.makeGrayWhiteButton("Back", Component.LEFT_ALIGNMENT);
        this.add(returnButton);
        
        this.add(Box.createRigidArea(new Dimension(0,20)));

        // create tables button
        createTablesButton = GUI_AMSStoreMain.makeGrayWhiteButton("Create Tables", Component.LEFT_ALIGNMENT);
        createTablesButton.setForeground(Color.RED);
        this.add(createTablesButton);
        
        this.add(Box.createRigidArea(new Dimension(0,5)));

        // drop tables button
        dropTablesButton = GUI_AMSStoreMain.makeGrayWhiteButton("Drop Tables", Component.LEFT_ALIGNMENT);
        dropTablesButton.setForeground(Color.RED);
        this.add(dropTablesButton);
        
        this.add(Box.createRigidArea(new Dimension(0,15)));
        
        // populate tables button
        populateTablesButton = GUI_AMSStoreMain.makeGrayWhiteButton("Populate Tables", Component.LEFT_ALIGNMENT);
        populateTablesButton.setForeground(Color.RED);
        this.add(populateTablesButton);
        
        this.add(Box.createRigidArea(new Dimension(0,15)));        

        // insert to table button
        insertToTableButton = GUI_AMSStoreMain.makeGrayWhiteButton("Insert to Table", Component.LEFT_ALIGNMENT);
        this.add(insertToTableButton);
        
        this.add(Box.createRigidArea(new Dimension(0,5)));

        // delete from table button
        deleteFromTableButton = GUI_AMSStoreMain.makeGrayWhiteButton("Delete from Table", Component.LEFT_ALIGNMENT);
        this.add(deleteFromTableButton);
        
        this.add(Box.createRigidArea(new Dimension(0,5)));

        // display table button
        displayTableButton = GUI_AMSStoreMain.makeGrayWhiteButton("Display Table", Component.LEFT_ALIGNMENT);
        this.add(displayTableButton);
	}

}
